package com.industrial.operation.service.impl;

import com.industrial.operation.domain.OperationHighQuality;
import com.industrial.operation.mapper.OperationHighQualityMapper;
import com.industrial.operation.service.IOperationHighQualityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 国家高质量发展综合绩效评价Service业务层处理
 *
 * @author ZhouS
 * @date 2024-03-27
 */
@Service
public class OperationHighQualityServiceImpl implements IOperationHighQualityService
{
    @Autowired
    private OperationHighQualityMapper operationHighQualityMapper;

    /**
     * 查询国家高质量发展综合绩效评价
     *
     * @param baseId 国家高质量发展综合绩效评价主键
     * @return 国家高质量发展综合绩效评价
     */
    @Override
    public OperationHighQuality selectOperationHighQualityByBaseId(String baseId)
    {
        return operationHighQualityMapper.selectOperationHighQualityByBaseId(baseId);
    }

    /**
     * 查询国家高质量发展综合绩效评价列表
     *
     * @param operationHighQuality 国家高质量发展综合绩效评价
     * @return 国家高质量发展综合绩效评价
     */
    @Override
    public List<OperationHighQuality> selectOperationHighQualityList(OperationHighQuality operationHighQuality)
    {
        return operationHighQualityMapper.selectOperationHighQualityList(operationHighQuality);
    }

    /**
     * 新增国家高质量发展综合绩效评价
     *
     * @param operationHighQuality 国家高质量发展综合绩效评价
     * @return 结果
     */
    @Override
    public int insertOperationHighQuality(OperationHighQuality operationHighQuality)
    {
        return operationHighQualityMapper.insertOperationHighQuality(operationHighQuality);
    }

    /**
     * 修改国家高质量发展综合绩效评价
     *
     * @param operationHighQuality 国家高质量发展综合绩效评价
     * @return 结果
     */
    @Override
    public int updateOperationHighQuality(OperationHighQuality operationHighQuality)
    {
        return operationHighQualityMapper.updateOperationHighQuality(operationHighQuality);
    }

    /**
     * 批量删除国家高质量发展综合绩效评价
     *
     * @param baseIds 需要删除的国家高质量发展综合绩效评价主键
     * @return 结果
     */
    @Override
    public int deleteOperationHighQualityByBaseIds(String[] baseIds)
    {
        return operationHighQualityMapper.deleteOperationHighQualityByBaseIds(baseIds);
    }

    /**
     * 删除国家高质量发展综合绩效评价信息
     *
     * @param baseId 国家高质量发展综合绩效评价主键
     * @return 结果
     */
    @Override
    public int deleteOperationHighQualityByBaseId(String baseId)
    {
        return operationHighQualityMapper.deleteOperationHighQualityByBaseId(baseId);
    }

    @Override
    public List<OperationHighQuality> groupYears(OperationHighQuality operationHighQuality) {
        return operationHighQualityMapper.groupYears(operationHighQuality);
    }

    @Override
    public List<OperationHighQuality> byYears(String years) {
        OperationHighQuality operationHighQuality=new OperationHighQuality();
        operationHighQuality.setYears(years);
        return  operationHighQualityMapper.selectOperationHighQualityList(operationHighQuality);
    }
}
